'use strict';
/**
 * Created by deng on 16-1-19.
 */
angular.module('metalabOperationApp').config(['$stateProvider', function ($stateProvider) {

    $stateProvider
        .state('meta.permission.user', {
            url: '/user',
            abstract: true,
            views: {
                'content': {
                    templateUrl: 'views/permission/common/content.html'
                }
            }
        }).state('meta.permission.user.user', {
            url: '/user',
            abstract: true
        }).state('meta.permission.user.user.list', {
            url: '/list?area&talent&province&page&sort&search&value&showAll',
            views: {
                'header@meta.permission.user': {
                    templateUrl: 'views/permission/user/header.html',
                    controller: 'HeaderCtrl'
                },
                'body@meta.permission.user': {
                    templateUrl: 'views/permission/user/index.html',
                    controller: 'UserListCtrl'
                },
                'page@meta.permission.user.user.list': {
                    templateUrl: 'views/permission/common/page.html'
                },
                //filter
                'meta-area-control@meta.permission.user.user.list': {
                    templateUrl: 'views/permission/filter/area.html'
                },
                'meta-talent-control@meta.permission.user.user.list': {
                    templateUrl: 'views/permission/filter/talent.html'
                },
                'meta-province-control@meta.permission.user.user.list': {
                    templateUrl: 'views/permission/filter/province.html'
                },
                //search
                'meta-search@meta.permission.user.user.list': {
                    templateUrl: 'views/permission/common/search.html'
                }
            }
        }).state('meta.permission.user.user.detail', {
            url: '/detail/:id',
            views: {
                'header@meta.permission.user': {
                    templateUrl: 'views/permission/user/header.html',
                    controller: 'HeaderCtrl'
                },
                'body@meta.permission.user': {
                    templateUrl: 'views/permission/common/detail.html',
                    controller: 'UserDetailEditCtrl'
                },
                'edit@meta.permission.user.user.detail':{
                    templateUrl: 'views/permission/user/edit.html'
                },
                'control@meta.permission.user.user.detail':{
                    templateUrl: 'views/permission/user/control.html'
                },
                'comment@meta.permission.user.user.detail':{
                    templateUrl: 'views/permission/common/comment.html'
                }
            }
        });
}]);
